package com.wyw.hemerocallis.repository;

import com.wyw.hemerocallis.entity.HemerocallisUser;
import org.springframework.data.jpa.repository.JpaRepository;

/**
 *
 * @author Mr Wu    yewen.wu.china@gmail.com
 * <p>
 * Update History:
 * Author        Time            Content
 */
public interface HemerocallisUserRepository extends JpaRepository<HemerocallisUser, Long> {
    /**
     * 根据用户名查询 hemerocallisUser 对象
     * select * from hemerocallis_user where username = ?
     * */
    HemerocallisUser findByUsername(String username);

    /**
     * 根据用户名和密码查询实体对象
     * select * from hemerocallis_user where username = ? and password = ?
     * */
    HemerocallisUser findByUsernameAndPassword(String username, String password);
}
